package com.start.controller;

import com.start.properties.StartProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by starmayu on 2017/9/25.
 *
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private StartProperties startProperties;

    @RequestMapping(value = "/say/{id}" , method = RequestMethod.GET)
    public String say(@PathVariable("id") Integer id){
        return "id"+id;
//        return startProperties.getCupSize();
    }

//    @RequestMapping(value = "/says" , method = RequestMethod.GET)
    @GetMapping(value = "/says")
    public String says(@RequestParam(value = "id",required = false, defaultValue = "0") Integer id){
        return "id"+id;
//        return startProperties.getCupSize();
    }
}
